package db;



import java.util.Iterator;
import java.util.List;

import org.hibernate.SessionFactory;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;


@SuppressWarnings("deprecation")
public class Main {
	
	public static void main(String[] args){
		
		SessionFactory sf = new Configuration().configure().buildSessionFactory();
		Session session = sf.openSession();
		TagManager tm= new TagManager(session);
		DBManager dbm = new DBManager();
		List<Tag> list;
		
		
		Tag t = new Tag();
		t.setFile("2");
		t.setTag("noa2");
		dbm.addTag(t);
		
	
		
		
	//	list = dbm.getFilesByTag("456");
	//	System.out.println(list.size());
	//	dbm.removeFile("1");
	//	dbm.getTags();


		
		
		
		
		//tm.saveTag(t);
		session.flush();
		session.close();
		
		
		
		
	}

}
